home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 3.8 KB | 89 lines | [TEXT/MPS ] |
- {
- File: TextObjectUtilities.p
-
- Contains: Text object Utilities Interfaces.
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT TextObjectUtilities;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __TEXTOBJECTUTILITIES__}
- {$SETC __TEXTOBJECTUTILITIES__ := 1}
-
- {$I+}
- {$SETC TextObjectUtilitiesIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __CONDITIONALMACROS__}
- {$I ConditionalMacros.p}
- {$ENDC}
- {$IFC UNDEFINED __UNICODE__}
- {$I Unicode.p}
- {$ENDC}
- {$IFC UNDEFINED __TEXTOBJECTS__}
- {$I TextObjects.p}
- {$ENDC}
- {$IFC UNDEFINED __AEDATAMODEL__}
- {$I AEDataModel.p}
- {$ENDC}
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
- FUNCTION ConvertPStringToTextObject(srcString: Str255; srcEncoding: TextEncoding; localeID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
- FUNCTION ConvertTextObjectToPString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; destString: StringPtr; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex): OSStatus; C;
- FUNCTION ConvertCStringToTextObject(srcString: ConstCStringPtr; srcEncoding: TextEncoding; localeID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
- FUNCTION ConvertTextObjectToCString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; destString: CStringPtr; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex): OSStatus; C;
- FUNCTION ConvertUnicodeStringToTextObject({CONST}VAR srcString: UniChar; stringLength: ByteCount; srcEncoding: TextEncoding; srcLocaleID: LocaleIdentifier; oldTextObject: TextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
- FUNCTION ConvertTextObjectToUnicodeString(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; VAR destString: UniChar; destMaxStringLength: ByteCount; destEncoding: TextEncoding; VAR nextIndex: TextObjectIndex; VAR destLength: ByteCount): OSStatus; C;
- FUNCTION ConcatTextObjects(textObject1: ConstTextObject; textObject2: ConstTextObject; VAR newTextObject: TextObject; optionBits: OptionBits): OSStatus; C;
- { Text object resource types }
-
- CONST
- kTextObjResourceType = 'txto'; { single text object }
- kTextObjListResourceType = 'txt#'; { list of text objects }
-
- {$ENDC}
- {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE }
- FUNCTION GetTextObject(VAR newTextObject: TextObject; textObjResID: INTEGER): OSStatus; C;
- FUNCTION GetTextObjectListCount(textObjListResID: INTEGER; VAR count: UInt16): OSStatus; C;
- FUNCTION GetIndTextObject(VAR newTextObject: TextObject; textObjListResID: INTEGER; index: UInt16): OSStatus; C;
- {$ENDC}
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- {$IFC FOR_PTR_BASED_AE }
- { The caller must provide the text object to be filled in. }
- FUNCTION ConvertAESubDescToTextObject({CONST}VAR subDesc: AESubDesc; textObject: TextObject): OSStatus; C;
- FUNCTION ConvertTextObjectToAEDesc(textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex; VAR descriptor: AEDesc): OSStatus; C;
- FUNCTION WriteTextObjectToAEStream(stream: AEStream; textObject: ConstTextObject; startIndex: TextObjectIndex; endIndex: TextObjectIndex): OSStatus; C;
- {$ENDC}
- {$ENDC}
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := TextObjectUtilitiesIncludes}
-
- {$ENDC} {__TEXTOBJECTUTILITIES__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-